package com.crhms.seabow.controller.category;

import com.crhms.seabow.model.CateLessonResult;
import com.crhms.seabow.service.CategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/category")
public class CategoryController {

    @Autowired
    private CategoryService categoryService;

    @RequestMapping("/getCateLessons")
    public List<CateLessonResult> getCateLessons(String bookId) {
        return categoryService.getCateLessons(bookId);
    }

}
